load("boot_tests.bzl", "cvd_command_boot_test", "cvd_load_boot_test", "launch_cvd_boot_test")

# cvd fetch + launch_cvd tests
launch_cvd_boot_test(
    name = "fetch_and_launch_git_main_x64_phone",
    branch = "git_main",
    target = "aosp_cf_x86_64_only_phone-trunk_staging-userdebug",
)

launch_cvd_boot_test(
    name = "fetch_and_launch_aosp_main_x64_phone",
    branch = "aosp-android-latest-release",
    target = "aosp_cf_x86_64_only_phone-userdebug",
)

launch_cvd_boot_test(
    name = "fetch_and_launch_aosp_android14_phone",
    branch = "aosp-android14-gsi",
    target = "aosp_cf_x86_64_phone-userdebug",
)

launch_cvd_boot_test(
    name = "fetch_and_launch_aosp_android13_phone",
    branch = "aosp-android13-gsi",
    target = "aosp_cf_x86_64_phone-userdebug",
)

launch_cvd_boot_test(
    name = "fetch_and_launch_aosp_android12_phone",
    branch = "aosp-android12-gsi",
    target = "aosp_cf_x86_64_phone-userdebug",
)

# cvd load tests
cvd_load_boot_test(
    name = "load_git_main_x64_phone",
    env_file = "environment_specs/git_main_x64_phone.json",
)

cvd_load_boot_test(
    name = "load_aosp_main_x64_phone",
    env_file = "environment_specs/aosp_main_x64_phone.json",
)

cvd_load_boot_test(
    name = "load_aosp_main_x64_phone_x2",
    size = "enormous",
    env_file = "environment_specs/aosp_main_x64_phone_x2.json",
)

cvd_command_boot_test(
    name = "list_env_services",
    branch = "aosp-android-latest-release",
    cvd_command = [
        "env",
        "ls",
    ],
    target = "aosp_cf_x86_64_only_phone-userdebug",
)

cvd_command_boot_test(
    name = "take_bugreport",
    branch = "aosp-android-latest-release",
    cvd_command = ["host_bugreport"],
    target = "aosp_cf_x86_64_only_phone-userdebug",
)

cvd_command_boot_test(
    name = "list_displays",
    branch = "aosp-android-latest-release",
    cvd_command = [
        "display",
        "list",
    ],
    target = "aosp_cf_x86_64_only_phone-userdebug",
)

# TODO(b/329100411) test loading older branches
